_package("alz.mui");

_import("alz.core.Animation");
_import("alz.mui.Component");

/**
 * 滚动条组件
 */
_class("ScrollBar", Component, function(){
	this._init = function(){
		_super._init.call(this);
		this._animation = null;
	};
	this.create = function(parent){
		var obj = this.createElement(parent, "div", "scrollbar");
		this.init(obj);
		return obj;
	};
	this.init = function(obj){
		_super.init.apply(this, arguments);
		this._opacity = 1;
		this.setOpacity(0);
		this._animation = new Animation(this, function(){
			this.onScrollEnd();
		});
	};
	this.dispose = function(){
		this._animation.dispose();
		this._animation = null;
		_super.dispose.apply(this);
	};
	this.onDragStart = function(ev){
	};
	this.onDragEnd = function(ev){
		this._animation.start();
	};
	this.onDrag = function(ev){
	};
});